<?php
class LoginForm extends sfForm{
	public function configure(){
		sfContext::getInstance()->getConfiguration()->loadHelpers('I18N');
		$this->setWidgets(array(
				'login_user'        		=> new sfWidgetFormInputText(),
				'login_password'          	=> new sfWidgetFormInputText()
		));
		$this->setValidators(array(
				'login_user'         		=> new sfValidatorString(array('required' => true)),
				'login_password'        	=> new sfValidatorString(array('required' => false))
		));
		$this->widgetSchema->setNameFormat('login[%s]');
		$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
	}
}
